package cn.edu.thsis.dao;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;

import cn.edu.thsis.pojo.User;
import cn.edu.thsis.pojo.student;
import cn.edu.thsis.pojo.teacher;
import cn.edu.thsis.pojo.thsis;

public interface UserDao {
	/**
	 * @Title:chexkUserLoginDao
	 * @Description:根据用户名和密码查询用户信息
	 * @param:@param uname 用户名
	 * @param:@param pwd 密码
	 * @return:User 返回查询到的用户信息
	 * @throws SQLException 
	 */
	User chexkUserLoginDao(String uid,String pwd,String type) throws SQLException;
	User findUserDao(String uid,String type) throws SQLException;
	
	/**
	 * @throws SQLException 
	 * @Title:userChangePwdDao
	 * @Description:根据用户ID修改用户密码
	 * @param:@param newPwd
	 * @param:@param uid
	 * @param:@param type
	 * @param:@return
	 * @return:int
	 * @throws
	 */
	int userChangePwdDao(String newPwd, String uid, String type) throws SQLException;

	/**
	 * @throws SQLException 
	 * @Title:teaShowDao
	 * @Description:获取教师信息
	 * @param:@return
	 * @return:List<teacher>
	 * @throws
	 */
	List<teacher> teaShowDao() throws SQLException;

	/**
	 * @Title:addteaDao
	 * @Description:添加老师信息
	 * @param:@param teahr
	 * @param:@return
	 * @return:int
	 * @throws
	 */
	int addteaDao(teacher teahr);
	/**
	 * @Title:addstuService
	 * @Description:添加学生信息
	 * @param:@param stud
	 * @param:@return
	 * @return:int
	 * @throws
	 */
	int addstuDao(student stud);
	/**
	 * @throws SQLException 
	 * @Title:stuShowDao
	 * @Description:获取学生信息
	 * @param:@param stud
	 * @param:@return
	 * @return:List<student>
	 * @throws
	 */
	List<student> stuShowDao() throws SQLException;
	/**
	 * @throws SQLException 
	 * @Title:delteaDao
	 * @Description:删除教师信息
	 * @param:@param uid
	 * @param:@return
	 * @return:int
	 * @throws
	 */
	int delteaDao(String uid) throws SQLException;
	/**
	 * @throws SQLException 
	 * @Title:delstuDao
	 * @Description:删除学生信息
	 * @param:@param uid
	 * @param:@return
	 * @return:int
	 * @throws
	 */
	int delstuDao(String uid) throws SQLException;
	/**
	 * @throws SQLException 
	 * @Title:doEnrolDao
	 * @Description:学生预约注册论题
	 * @param:@param thsis_id
	 * @param:@param stu_id
	 * @param:@return
	 * @return:int
	 * @throws
	 */
	int doEnrolDao(String thsis_id, String stu_id) throws SQLException;
	/**
	 * @throws SQLException 
	 * @Title:doAcceptDao
	 * @Description:得到已预约本论题学生列表
	 * @param:@param thsis_id
	 * @param:@return
	 * @return:student
	 * @throws
	 */
	List<student> doAcceptDao(String thsis_id) throws SQLException;
	/**
	 * @Title:addthDao
	 * @Description:添加论题
	 * @param:@param the
	 * @param:@return
	 * @return:int
	 * @throws
	 */
	int addthDao(thsis the);
	//查看未选题的学生
	List<student> stuthDao() throws SQLException;
	/**
	 * @throws SQLException 
	 * @Title:teathDao
	 * @Description:TODO
	 * @param:@return
	 * @return:List<teacher>
	 * @throws
	 */
	List<teacher> teathDao() throws SQLException;
	//接受学生选择该论题
	int okDao(String thsis_id, String stu_id) throws SQLException;
	//教师查看自己的论题
	List<thsis> mythDao(String uid) throws SQLException;
	//拒绝学生选择该论题
	int noDao(String thsis_id, String stu_id) throws SQLException;
	//催促学生选题
	int warnstu(String id) throws SQLException;
	//催促教师出题
	int warnteaDao(String id) throws SQLException;
	//查看所有论题信息
	List<thsis> allthesdao() throws SQLException;
}
